#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>


void Pong(int _signum)
{
    printf("pong\n");
}

int main()
{
    struct sigaction sa;
    int pid;

    sa.sa_handler = Pong;

    sigaction(SIGUSR1, &sa ,0);

    printf("process2: %d\n", getpid());

    scanf("%d", &pid);
    sleep(5);

    while(1)
    {
        kill(pid, SIGUSR1);
    }

    return 0;
}
